#include "stdinc.h"
#include "../misc.h"

#include <windows.h>

LARGE_INTEGER perfFreq;
LARGE_INTEGER perfCnt;

void InitMiscPlatf()
{
	QueryPerformanceFrequency(&perfFreq);
	QueryPerformanceCounter(&perfCnt);
}

void ShutdownMiscPlatf()
{
}

void OutDbgStr(char* str)
{
	OutputDebugString(str);
}

float GetTime()
{
	LARGE_INTEGER pc;
	u64 dif;

	QueryPerformanceCounter(&pc);
	dif = pc.QuadPart - perfCnt.QuadPart;

	dif = (dif * 10000) / perfFreq.QuadPart;

	return dif / 10000.0f;
}